package cn.anecansaitin.jep.parser.ast.node.expression.literal;

import cn.anecansaitin.jep.Token;
import cn.anecansaitin.jep.TokenType;
import cn.anecansaitin.jep.types.TypeInfo;

public final class StringLiteral extends Literal {
    private final String value;

    public StringLiteral(Token token) {
        this(token.value(), token.line(), token.column());
    }

    public StringLiteral(String value, int line, int column) {
        super(TokenType.STRING_LITERAL, TypeInfo.STRING, line, column);
        this.value = value;
    }

    public String value() {
        return value;
    }
}